#pragma once

#include "Render2D.h"
#include "Model.h"
#include "Controller.h"
#include "Actor.h"
#include "PhysicActor.h"
#include "FatPointer.h"
//#include "InputProxy.h"
#include "KeyInput.h"
#include "MouseInput.h"
#include "TextField.h"

#include <allegro.h>
#include <vector>
#include <stdlib.h>

class View
{
	Model *model;
	Controller *controller;
	Render2D render;
	//InputProxy proxy;
	
	std::vector <Actor *> actors;

public:
	View(Model *m, Controller *c);
	~View(void);

	KeyInput keyInput;
	MouseInput mouseInput;

	void gameInit();
	void getInput();
	void sendOutput(Event *e = NULL);
	void createActor(GameObject ** o);
	Sprite ** addSprite(Sprite *s, unsigned int depth){return render.addSprite(s, depth);};
	void releaseRender();
};
